Optimal. Leaf size=246 \[ \frac {\left (c \left (5 e^2 f^2+2 d e f g+d^2 g^2\right )+2 e g (4 a e g-b (3 e f+d g))\right ) \sqrt {d+e x} \sqrt {f+g x}}{8 e^2 g^3}-\frac {(5 c e f+7 c d g-6 b e g) (d+e x)^{3/2} \sqrt {f+g x}}{12 e^2 g^2}+\frac {c (d+e x)^{5/2} \sqrt {f+g x}}{3 e^2 g}-\frac {(e f-d g) \left (c \left (5 e^2 f^2+2 d e f g+d^2 g^2\right )+2 e g (4 a e g-b (3 e f+d g))\right ) \tanh ^{-1}\left (\frac {\sqrt {g} \sqrt {d+e x}}{\sqrt {e} \sqrt {f+g x}}\right )}{8 e^{5/2} g^{7/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.16, antiderivative size = 246, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.207, Rules used = {965, 81, 52, 65,
223, 212} \begin {gather*} \frac {\sqrt {d+e x} \sqrt {f+g x} \left (2 e g (4 a e g-b (d g+3 e f))+c \left (d^2 g^2+2 d e f g+5 e^2 f^2\right )\right )}{8 e^2 g^3}-\frac {(e f-d g) \tanh ^{-1}\left (\frac {\sqrt {g} \sqrt {d+e x}}{\sqrt {e} \sqrt {f+g x}}\right ) \left (2 e g (4 a e g-b (d g+3 e f))+c \left (d^2 g^2+2 d e f g+5 e^2 f^2\right )\right )}{8 e^{5/2} g^{7/2}}-\frac {(d+e x)^{3/2} \sqrt {f+g x} (-6 b e g+7 c d g+5 c e f)}{12 e^2 g^2}+\frac {c (d+e x)^{5/2} \sqrt {f+g x}}{3 e^2 g} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 52
Rule 65
Rule 81
Rule 212
Rule 223
Rule 965
Rubi steps
\begin {align*} \int \frac {\sqrt {d+e x} \left (a+b x+c x^2\right )}{\sqrt {f+g x}} \, dx &=\frac {c (d+e x)^{5/2} \sqrt {f+g x}}{3 e^2 g}+\frac {\int \frac {\sqrt {d+e x} \left (\frac {1}{2} \left (6 a e^2 g-c d (5 e f+d g)\right )-\frac {1}{2} e (5 c e f+7 c d g-6 b e g) x\right )}{\sqrt {f+g x}} \, dx}{3 e^2 g}\\ &=-\frac {(5 c e f+7 c d g-6 b e g) (d+e x)^{3/2} \sqrt {f+g x}}{12 e^2 g^2}+\frac {c (d+e x)^{5/2} \sqrt {f+g x}}{3 e^2 g}+\frac {\left (c \left (5 e^2 f^2+2 d e f g+d^2 g^2\right )+2 e g (4 a e g-b (3 e f+d g))\right ) \int \frac {\sqrt {d+e x}}{\sqrt {f+g x}} \, dx}{8 e^2 g^2}\\ &=\frac {\left (c \left (5 e^2 f^2+2 d e f g+d^2 g^2\right )+2 e g (4 a e g-b (3 e f+d g))\right ) \sqrt {d+e x} \sqrt {f+g x}}{8 e^2 g^3}-\frac {(5 c e f+7 c d g-6 b e g) (d+e x)^{3/2} \sqrt {f+g x}}{12 e^2 g^2}+\frac {c (d+e x)^{5/2} \sqrt {f+g x}}{3 e^2 g}-\frac {\left ((e f-d g) \left (c \left (5 e^2 f^2+2 d e f g+d^2 g^2\right )+2 e g (4 a e g-b (3 e f+d g))\right )\right ) \int \frac {1}{\sqrt {d+e x} \sqrt {f+g x}} \, dx}{16 e^2 g^3}\\ &=\frac {\left (c \left (5 e^2 f^2+2 d e f g+d^2 g^2\right )+2 e g (4 a e g-b (3 e f+d g))\right ) \sqrt {d+e x} \sqrt {f+g x}}{8 e^2 g^3}-\frac {(5 c e f+7 c d g-6 b e g) (d+e x)^{3/2} \sqrt {f+g x}}{12 e^2 g^2}+\frac {c (d+e x)^{5/2} \sqrt {f+g x}}{3 e^2 g}-\frac {\left ((e f-d g) \left (c \left (5 e^2 f^2+2 d e f g+d^2 g^2\right )+2 e g (4 a e g-b (3 e f+d g))\right )\right ) \text {Subst}\left (\int \frac {1}{\sqrt {f-\frac {d g}{e}+\frac {g x^2}{e}}} \, dx,x,\sqrt {d+e x}\right )}{8 e^3 g^3}\\ &=\frac {\left (c \left (5 e^2 f^2+2 d e f g+d^2 g^2\right )+2 e g (4 a e g-b (3 e f+d g))\right ) \sqrt {d+e x} \sqrt {f+g x}}{8 e^2 g^3}-\frac {(5 c e f+7 c d g-6 b e g) (d+e x)^{3/2} \sqrt {f+g x}}{12 e^2 g^2}+\frac {c (d+e x)^{5/2} \sqrt {f+g x}}{3 e^2 g}-\frac {\left ((e f-d g) \left (c \left (5 e^2 f^2+2 d e f g+d^2 g^2\right )+2 e g (4 a e g-b (3 e f+d g))\right )\right ) \text {Subst}\left (\int \frac {1}{1-\frac {g x^2}{e}} \, dx,x,\frac {\sqrt {d+e x}}{\sqrt {f+g x}}\right )}{8 e^3 g^3}\\ &=\frac {\left (c \left (5 e^2 f^2+2 d e f g+d^2 g^2\right )+2 e g (4 a e g-b (3 e f+d g))\right ) \sqrt {d+e x} \sqrt {f+g x}}{8 e^2 g^3}-\frac {(5 c e f+7 c d g-6 b e g) (d+e x)^{3/2} \sqrt {f+g x}}{12 e^2 g^2}+\frac {c (d+e x)^{5/2} \sqrt {f+g x}}{3 e^2 g}-\frac {(e f-d g) \left (c \left (5 e^2 f^2+2 d e f g+d^2 g^2\right )+2 e g (4 a e g-b (3 e f+d g))\right ) \tanh ^{-1}\left (\frac {\sqrt {g} \sqrt {d+e x}}{\sqrt {e} \sqrt {f+g x}}\right )}{8 e^{5/2} g^{7/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.73, size = 199, normalized size = 0.81 \begin {gather*} \frac {e \sqrt {d+e x} \sqrt {f+g x} \left (6 e g (4 a e g+b (-3 e f+d g+2 e g x))+c \left (-3 d^2 g^2+2 d e g (-2 f+g x)+e^2 \left (15 f^2-10 f g x+8 g^2 x^2\right )\right )\right )+3 \sqrt {\frac {e}{g}} (e f-d g) \left (c \left (5 e^2 f^2+2 d e f g+d^2 g^2\right )+2 e g (4 a e g-b (3 e f+d g))\right ) \log \left (\sqrt {d+e x}-\sqrt {\frac {e}{g}} \sqrt {f+g x}\right )}{24 e^3 g^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(762\) vs.
\(2(214)=428\).
time = 0.08, size = 763, normalized size = 3.10
method | result | size |
default | \(\frac {\sqrt {e x +d}\, \sqrt {g x +f}\, \left (16 c \,e^{2} g^{2} x^{2} \sqrt {e g}\, \sqrt {\left (e x +d \right ) \left (g x +f \right )}+24 \ln \left (\frac {2 e g x +2 \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, \sqrt {e g}+d g +e f}{2 \sqrt {e g}}\right ) a d \,e^{2} g^{3}-24 \ln \left (\frac {2 e g x +2 \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, \sqrt {e g}+d g +e f}{2 \sqrt {e g}}\right ) a \,e^{3} f \,g^{2}-6 \ln \left (\frac {2 e g x +2 \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, \sqrt {e g}+d g +e f}{2 \sqrt {e g}}\right ) b \,d^{2} e \,g^{3}-12 \ln \left (\frac {2 e g x +2 \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, \sqrt {e g}+d g +e f}{2 \sqrt {e g}}\right ) b d \,e^{2} f \,g^{2}+18 \ln \left (\frac {2 e g x +2 \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, \sqrt {e g}+d g +e f}{2 \sqrt {e g}}\right ) b \,e^{3} f^{2} g +3 \ln \left (\frac {2 e g x +2 \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, \sqrt {e g}+d g +e f}{2 \sqrt {e g}}\right ) c \,d^{3} g^{3}+3 \ln \left (\frac {2 e g x +2 \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, \sqrt {e g}+d g +e f}{2 \sqrt {e g}}\right ) c \,d^{2} e f \,g^{2}+9 \ln \left (\frac {2 e g x +2 \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, \sqrt {e g}+d g +e f}{2 \sqrt {e g}}\right ) c d \,e^{2} f^{2} g -15 \ln \left (\frac {2 e g x +2 \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, \sqrt {e g}+d g +e f}{2 \sqrt {e g}}\right ) c \,e^{3} f^{3}+24 \sqrt {e g}\, \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, b \,e^{2} g^{2} x +4 \sqrt {e g}\, \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, c d e \,g^{2} x -20 \sqrt {e g}\, \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, c \,e^{2} f g x +48 \sqrt {e g}\, \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, a \,e^{2} g^{2}+12 \sqrt {e g}\, \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, b d e \,g^{2}-36 \sqrt {e g}\, \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, b \,e^{2} f g -6 \sqrt {e g}\, \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, c \,d^{2} g^{2}-8 \sqrt {e g}\, \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, c d e f g +30 \sqrt {e g}\, \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, c \,e^{2} f^{2}\right )}{48 g^{3} \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, e^{2} \sqrt {e g}}\) | \(763\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 5.51, size = 564, normalized size = 2.29 \begin {gather*} \left [-\frac {{\left (3 \, {\left (c d^{3} g^{3} - {\left (5 \, c f^{3} - 6 \, b f^{2} g + 8 \, a f g^{2}\right )} e^{3} + {\left (3 \, c d f^{2} g - 4 \, b d f g^{2} + 8 \, a d g^{3}\right )} e^{2} + {\left (c d^{2} f g^{2} - 2 \, b d^{2} g^{3}\right )} e\right )} \sqrt {g} e^{\frac {1}{2}} \log \left (d^{2} g^{2} - 4 \, {\left (d g + {\left (2 \, g x + f\right )} e\right )} \sqrt {g x + f} \sqrt {x e + d} \sqrt {g} e^{\frac {1}{2}} + {\left (8 \, g^{2} x^{2} + 8 \, f g x + f^{2}\right )} e^{2} + 2 \, {\left (4 \, d g^{2} x + 3 \, d f g\right )} e\right ) + 4 \, {\left (3 \, c d^{2} g^{3} e - {\left (8 \, c g^{3} x^{2} + 15 \, c f^{2} g - 18 \, b f g^{2} + 24 \, a g^{3} - 2 \, {\left (5 \, c f g^{2} - 6 \, b g^{3}\right )} x\right )} e^{3} - 2 \, {\left (c d g^{3} x - 2 \, c d f g^{2} + 3 \, b d g^{3}\right )} e^{2}\right )} \sqrt {g x + f} \sqrt {x e + d}\right )} e^{\left (-3\right )}}{96 \, g^{4}}, -\frac {{\left (3 \, {\left (c d^{3} g^{3} - {\left (5 \, c f^{3} - 6 \, b f^{2} g + 8 \, a f g^{2}\right )} e^{3} + {\left (3 \, c d f^{2} g - 4 \, b d f g^{2} + 8 \, a d g^{3}\right )} e^{2} + {\left (c d^{2} f g^{2} - 2 \, b d^{2} g^{3}\right )} e\right )} \sqrt {-g e} \arctan \left (\frac {{\left (d g + {\left (2 \, g x + f\right )} e\right )} \sqrt {g x + f} \sqrt {-g e} \sqrt {x e + d}}{2 \, {\left ({\left (g^{2} x^{2} + f g x\right )} e^{2} + {\left (d g^{2} x + d f g\right )} e\right )}}\right ) + 2 \, {\left (3 \, c d^{2} g^{3} e - {\left (8 \, c g^{3} x^{2} + 15 \, c f^{2} g - 18 \, b f g^{2} + 24 \, a g^{3} - 2 \, {\left (5 \, c f g^{2} - 6 \, b g^{3}\right )} x\right )} e^{3} - 2 \, {\left (c d g^{3} x - 2 \, c d f g^{2} + 3 \, b d g^{3}\right )} e^{2}\right )} \sqrt {g x + f} \sqrt {x e + d}\right )} e^{\left (-3\right )}}{48 \, g^{4}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 2.88, size = 436, normalized size = 1.77 \begin {gather*} -\frac {\frac {24 \, {\left (\frac {{\left (d g^{2} - f g e\right )} e^{\left (-\frac {1}{2}\right )} \log \left ({\left | -\sqrt {g x + f} \sqrt {g} e^{\frac {1}{2}} + \sqrt {d g^{2} + {\left (g x + f\right )} g e - f g e} \right |}\right )}{\sqrt {g}} - \sqrt {d g^{2} + {\left (g x + f\right )} g e - f g e} \sqrt {g x + f}\right )} a {\left | g \right |}}{g^{2}} - \frac {{\left (\sqrt {d g^{2} + {\left (g x + f\right )} g e - f g e} \sqrt {g x + f} {\left (2 \, {\left (g x + f\right )} {\left (\frac {4 \, {\left (g x + f\right )}}{g^{2}} + \frac {{\left (d g^{6} e^{3} - 13 \, f g^{5} e^{4}\right )} e^{\left (-4\right )}}{g^{7}}\right )} - \frac {3 \, {\left (d^{2} g^{7} e^{2} + 2 \, d f g^{6} e^{3} - 11 \, f^{2} g^{5} e^{4}\right )} e^{\left (-4\right )}}{g^{7}}\right )} - \frac {3 \, {\left (d^{3} g^{3} + d^{2} f g^{2} e + 3 \, d f^{2} g e^{2} - 5 \, f^{3} e^{3}\right )} e^{\left (-\frac {5}{2}\right )} \log \left ({\left | -\sqrt {g x + f} \sqrt {g} e^{\frac {1}{2}} + \sqrt {d g^{2} + {\left (g x + f\right )} g e - f g e} \right |}\right )}{g^{\frac {3}{2}}}\right )} c {\left | g \right |}}{g^{2}} - \frac {6 \, {\left (\frac {{\left (d^{2} g^{3} + 2 \, d f g^{2} e - 3 \, f^{2} g e^{2}\right )} e^{\left (-\frac {3}{2}\right )} \log \left ({\left | -\sqrt {g x + f} \sqrt {g} e^{\frac {1}{2}} + \sqrt {d g^{2} + {\left (g x + f\right )} g e - f g e} \right |}\right )}{\sqrt {g}} + \sqrt {d g^{2} + {\left (g x + f\right )} g e - f g e} {\left (2 \, g x + {\left (d g e - 5 \, f e^{2}\right )} e^{\left (-2\right )} + 2 \, f\right )} \sqrt {g x + f}\right )} b {\left | g \right |}}{g^{3}}}{24 \, g} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 74.34, size = 1832, normalized size = 7.45 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________